package AbstractFactory;

public class Client {
    public static void main(String[] args) {
        AbstractFactory factory1,factory2;
        factory1= new ConcreteFactory1();
        factory2= new ConcreteFactory2();

        Fruit fruit1,fruit2;
        Vegetable vegetable1,vegetable2;

        fruit1 = factory1.createFruit();
        vegetable1 = factory1.createVegetables();
        fruit1.eat();
        vegetable1.cook();

        fruit2 = factory2.createFruit();
        vegetable2 = factory2.createVegetables();
        fruit2.eat();
        vegetable2.cook();
    }
}
